//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CustomerType, CustomerTypeResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCustomerTypeList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CustomerTypeResponse>(`/uctoo/customer_type/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCustomerType = async (id: string) => {
  return requestClient.get<CustomerType>(`/uctoo/customer_type/${id}`);
};

export const adductooCustomerType = async (data: Partial<CustomerType>) => {
  return requestClient.post<CustomerType>('/uctoo/customer_type/add', data);
};

export const edituctooCustomerType = async (data: Partial<CustomerType>) => {
  return requestClient.post<CustomerType>('/uctoo/customer_type/edit', data);
};

export const deleteuctooCustomerType = async (id: string) => {
  return requestClient.post<any>('/uctoo/customer_type/del', { id });
};
